package com.inspur.edp.common.expr.visitor;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author lizhaorui
 * @description TODO
 * @date 2024/7/16 9:47
 */

@Data
public class VisitResult {

    private String script;

    private List<String> imports;

    public VisitResult() {

    }

    public VisitResult(String script) {
        this.script = script;
    }

    public void addImport(String importStr) {
        if (this.imports == null) {
            this.imports = new ArrayList<>();
        }
        this.imports.add(importStr);
    }

    public void addImport(List<String> importList) {
        if (this.imports == null) {
            this.imports = new ArrayList<>();
        }
        this.imports.addAll(importList);
    }

}
